<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    let fun1 = (x, y) => x + y;
    //fun2是尾调用
    let fun2 = () => {
        return fun1(3, 4);//尾调用必须在最后一步
    }
    //fun3调用fun1不在最后一步，不属于尾调用 
    let fun3 = () => {
        let n = fun1(3, 4);
        return n;
    }
    //fun4调用fun1后参与运算，不属于尾调用 
    let fun4= () => {
        return fun1(3, 4)+1;
    }
   
</script>

</html>